﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Xml.Serialization;
using Daystate.ConfigurationManager;

namespace Test2
{
    public class Program
    {
        static void Main(string[] args)
        {
            var mngr = ConfigManager<TestConfigClass>.CreateInstance(Constants.config_file_path);

            foreach (var item in mngr.Configuration)
                Console.WriteLine(item.GetValue<string>());

            Console.WriteLine(
                mngr.Configuration[TestConfigClass.ConfigurationKeys.TestIntVal].GetValue<int>());

            Console.WriteLine(
                Utilities.ConfigurationManager[TestConfigClass.ConfigurationKeys.TestIntVal].GetValue<int>());

            Console.ReadKey();

        }

        public class Utilities
        {
            public static TestConfigClass ConfigurationManager
            {
                get
                {
                    return ConfigManager<TestConfigClass>.Instance.Configuration;
                }
            }
        }

        public class Constants
        {
            public static string config_file_path = "new_config_file.xml";
            public static string configNamespace = "Daystate.TestConfigurationHelper";
        }

    }
}
